/**
 * 
 */
package com.jw.server.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao 
 * 
 * 
 * 网约车平台公司营运规模信息
 */
@Entity
public class BaseInfoCompanyStat extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5370669597479782728L;

	private String vehicleNum;

	private String driverNum;

	public String getVehicleNum() {
		return vehicleNum;
	}

	public void setVehicleNum(String vehicleNum) {
		this.vehicleNum = vehicleNum;
	}

	public String getDriverNum() {
		return driverNum;
	}

	public void setDriverNum(String driverNum) {
		this.driverNum = driverNum;
	}
	
	public static OTIpcDef.BaseInfoCompanyStat convert(BaseInfoCompanyStat data){
        OTIpcDef.BaseInfoCompanyStat item = OTIpcDef.BaseInfoCompanyStat.newBuilder()
                .setCompanyId(data.getCompanyId())
                .setVehicleNum(Integer.parseInt(data.getVehicleNum()))
                .setDriverNum(Integer.parseInt(data.getDriverNum()))
                .setFlag(data.getFlag())
                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
                .build();

        return item;
    }
	
	public static BaseInfoCompanyStat  convertPojo(OTIpcDef.BaseInfoCompanyStat data){
		BaseInfoCompanyStat  bics=new BaseInfoCompanyStat();
		bics.setCompanyId(data.getCompanyId());
		bics.setDriverNum(data.getDriverNum()+"");
		bics.setFlag(data.getFlag());
		bics.setUpdateTime(data.getUpdateTime());
		bics.setVehicleNum(data.getVehicleNum()+"");
		return bics;
	}

}
